#define  _CRT_SECURE_NO_WARNINGS 1
#include"list.h"



ListNode* buyNode(LTDataType x)
{
	ListNode* pnode = (ListNode*)malloc(sizeof(ListNode));
	if (pnode == NULL)
	{
		perror("malloc fail!");
		exit(1);
	}
	ListNode* node = pnode;
	node->data = x;
	node->next = NULL;
	node->prev = NULL;
	return node;
}

void ListInit(ListNode** phead)
{
	*phead = buyNode(-1);

}